package com.ruoyi.web.controller.common;


import cn.hutool.http.HttpRequest;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

import static com.ruoyi.web.controller.common.RobotConstant.SEND_OWNTHINK_URL;

public class TestUtils {

    public static void main(String[] args) {
        String body = HttpRequest.get(SEND_OWNTHINK_URL + "a" +"&spoken="+ "你好")
            .timeout(20000)
            .execute().body();
        JSONObject jsonObject = JSONObject.parseObject(body);
        String s = jsonObject.getJSONObject("data").getJSONObject("info").get("text").toString();
        System.out.println("jsonObject = " + s);
    }
}
